import axios from '@/utils/request'

import config from '@/common/config'

let base = config.getMkBasePath();

/**
 * 订单佣金计算表
 *1    默认只开放普通查询，所有查询，只要上传	 分页参数 {currentPage:当前页码从1开始,pageSize:每页记录数,total:总记录【数如果是0后台会自动计算总记录数非0不会自动计算】}，后台都会自动按分页查询 其它 api用到再打开，没用到的api请注释掉，
 *2 查询、新增、修改的参数格式  params={orderId:'订单编号 主键',orderTotalFee:'订单总佣金=各个产品佣金合计',orderTotalAmount:'订单总金额',orderActPayAmount:'实际支付总金额',orderReduceAmount:'优惠扣减金额',custId:'客户编号',flowId:'审批流程实例编号',flowStatus:'审批流状态',acctDate:'核算时间',accountDate:'入账时间',actStaffFee:'营销人员实际发放佣金',startComputeDate:'开始核算时间',orderPayDate:'订单支付日期',remark:'备注',orderDistrictId:'订单归属区域',custDistrictId:'客户归属区域',mkStaff:'主销售人员',mkStaffName:'主销售人员姓名',custName:'客户名称',custDistrictName:'客户归属区域名称',orderDistrictName:'订单归属区域名称',feeType:'销售类型0分销1其它',locationId:'下单门店编号',locationName:'下单门店名称',shopId:'订单归属商户编号'}
 **/
 
//普通查询 条件之间and关系  
export const listOrderFee = params => { return axios.get(`${base}/mk/mng/computed/orderFee/list`, { params: params }); };

//模糊查询订单佣金计算表 条件之间or关系  
//export const listOrderFeeKey = params => { return axios.get(`${base}/mk/mng/computed/orderFee/listKey`, { params: params }); };

//删除一条订单佣金计算表 params={orderId:'订单编号 主键'}
export const delOrderFee = params => { return axios.post(`${base}/mk/mng/computed/orderFee/del`,params); };

//批量删除订单佣金计算表  params=[{orderId:'订单编号 主键'}]
export const batchDelOrderFee = params => { return axios.post(`${base}/mk/mng/computed/orderFee/batchDel`, params); };

//修改一条订单佣金计算表记录
export const editOrderFee = params => { return axios.post(`${base}/mk/mng/computed/orderFee/edit`, params); };

//新增一条订单佣金计算表
export const addOrderFee = params => { return axios.post(`${base}/mk/mng/computed/orderFee/add`, params); };